import request from '../utils/http'

export function Login(data) {
	return request({
		method: "post",
		url: "/login",
		data: data
	})
}

export function Register(data) {
	return request({
		method: "post",
		url: "/register",
		data: data
	})
}
// 检查账号的唯一性
export function checkOnly(account) {
	return request({
		method: "get",
		url: `/checkoutAccountOnly?account=${account}`,

	})
}

// 获取用户的预约记录
export function getUserRes(query) {
	return request({
		method: "get",
		url: `/user/getUserRes`,
		data: query

	})
}

// 更新用户密码
export function updatePassword(query) {
	return request({
		method: "post",
		url: `/user/updatePassword`,
		data: query

	})
}

// 更新用户信息
export function updateUserInfo(data) {
	return request({
		method: "post",
		url: `/user/updateUserInfo`,
		data: data

	})
}

// 条件获取用户列表
export function getUsers(data) {
	return request({
		method: "get",
		url: `/user/getUsers`,
		data: data

	})
}

// 获取基础用户数据
export function getBaseUsers(data) {
	return request({
		method: "get",
		url: `/user/getBaseUsers`,
		data: data

	})
}

// 根据 userId 删除用户
export function deleteUser(query) {
	return request({
		method: "delete",
		url: `/user/deleteUser`,
		data: query

	})
}

// 单个添加用户

export function addBaseUser(data) {
	return request({
		method: "post",
		url: `/user/addBaseUsers`,
		data: data

	})
}